<?php
namespace Model;

use SDF\Db\MongoCollection;

/**
 * 部门类构造函数
 */
class shop extends MongoCollection{
    /**
     * 部门类构造函数
     */
    public function __construct(){
        parent::__construct('shop','ismbao');
    }
    //获取所有店铺信息
    public function get_shop(){
        $shop_arr = $this->find(array(),array('shop_name'));
        $shop_list= array();
        foreach ($shop_arr as $v){
            $shop['shop_id'] = (string)$v['_id'];
            $shop['shop_name'] = (string)$v['shop_name'];
            array_push($shop_list,$shop);
        }
        return $shop_list;
    }
}